package com.tuantuan.schoolhelper.dao;

import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public class DataDao {

	
	public static String getCityId(String cityName){
		String cityId=null;
		SQLiteDatabase db=SQLiteDatabase.openDatabase("/data/data/com.tuantuan.schoolhelper/files/data.db", null,
				SQLiteDatabase.OPEN_READWRITE);
		
		Cursor coursor=db.rawQuery("select id from cityInfo where zoon=?", new String[]{cityName});
		
		
		if(coursor.moveToNext()){
			cityId=coursor.getString(0);
		}
		return cityId;
	}
}
